<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="conversation.css" rel="STYLESHEET" type="text/css">
<title>Edit Dialogue Act Dimension</title>
</head>
<body>
<!--        Header         -->
<jsp:include page="scripts/headerEdit.jsp" >
    <jsp:param name="title" value="Edit Dialogue Act Dimensions" />
</jsp:include>
<div class="list">
<spring:bind path="dadimension.*">
<c:forEach items="${status.errorMessages}" var="error">
Error Message: <c:out value="${error}"/><br>
</c:forEach>
</spring:bind>
<form method="post" action="enterdadimension.html">
<table>
  <tr>
    <th align="left">Scheme</th>
    <th align="left">Dimension</th>    
    <th align="left">Description</th>
  </tr>
  <tr>
    <td><spring:bind path="dadimension.dialogueActScheme">
      <select name='<c:out value="${status.expression}"/>'
        value='<c:out value="${status.value}"/>'
      >
        <c:forEach items="${daschemes}" var="dascheme">
          <option value='<c:out value="${dascheme.dialogueActSchemeId}"/>'
          <c:if
            test="${dadimension.dialogueActScheme.dialogueActSchemeId == dascheme.dialogueActSchemeId}"
          >
                      SELECTED
   				    </c:if>> <c:out value="${dascheme.scheme}" /></option>
        </c:forEach>
      </select>
    </spring:bind></td>
    <td><spring:bind path="dadimension.dimension">
      <input name='<c:out value="${status.expression}"/>'
        value='<c:out value="${status.value}"/>' type="text" size="24"
        maxlength="36"
      >
    </spring:bind></td>
    <td><spring:bind path="dadimension.description">
      <textarea cols="40" rows="5" name='<c:out value="${status.expression}"/>'>
        <c:out value="${status.value}"/>
      </textarea>              
    </spring:bind></td>
  </tr>
</table>
<p align="center"><input name="save" value="Save" type="submit">
<input name="cancel" type="button" value="Cancel"
  onClick="javascript:window.location='enterdadimension.html'"
></p>
</form>
</div>
<div class="list">
<h3>Current Dialogue Act Dimensions</h3>
<table>
  <tr>
    <th align="left">Scheme</th>
    <th align="left">Dimension</th>
    <th align="left">Description</th>
  </tr>
  <c:forEach items="${dadimensions}" var="dimension">
    <tr>
      <td align="left"><c:out
        value="${dimension.dialogueActScheme}"
      /></td>
      <td align="left"><c:out value="${dimension.dimension}" /></td>
      <td align="left"><c:out value="${dimension.description}" /></td>
    </tr>
  </c:forEach>
</table>
</div>
</body>
</html>

